/**
* @description: 标准化作业--作业项目
* @author: wqn & yanxiaoyue
* @data:2023年6月17日 - 2023年7月11日
* @remark:
**/
<template>
	<view class="job">
		<nav-bar title="作业项目" @goBack="goBack"></nav-bar>
		<view class="view-details">
			<view class="border">
				<view class="title layout">
					<text class="project">{{ title }}</text>
				</view>
				<view class="content-list" v-for="(item,index) in jobDetails" :key="index">
					<view class="distance">
						<view class="affirm layout">
							<img style="width: 22px;height: 22px;" src="../../../static/standardizedOperationImg/zxckBlue.png"
								alt="">
							<text>{{ item.workXm }}</text>
						</view>
						<van-divider />
						<view class="content">
							<text>
								{{ subTitle }}：<br>
								{{ item.workContent }}
							</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import navBar from "../common/navBar.vue"
	import ViewDetails from "../common/viewDetails.vue";
	import {
		Dialog
	} from "vant";
	import {
		selectoperatingitemlog
	} from "../../../api/bzhzyApi";

	export default {
		name: "jobItem",
		components: {
			ViewDetails,
			navBar
		},
		data() {
			return {
				title: '作业项目',
				show: true,
				subTitle: '作业内容',
				jobDetails: [],
			}
		},
		onLoad(option) {
			this.work = JSON.parse(option.pushParam)
			this.getOperatingitemlog()
		},
		methods: {
			goBack() {
				uni.navigateBack()
			},
			getOperatingitemlog() {
				this.$apiRequest.bzhzyApi.selectoperatingitemlog({
					workPlanId: this.work.id,
					consultationDeductionId: this.work.OBJID,
					pageFlag: this.work.pageFlag
				}).then(res => {
					this.jobDetails = res.data
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.job {
		background: #F2F6FA;
		display: flex;
		flex-direction: column;
		overflow: hidden;
		width: 100vw;
		height: 100vh;

	}

	.verify {
		margin: px2vh(76) 0;

		.van-button--normal {
			width: 100%;
			height: px2vh(120);
			font-size: px2vh(46);
			background: #417ADC;
			border: none;
		}
	}

	.view-details {
		flex: 1;
		width: 100vw;
		overflow: scroll;

		.layout {
			display: flex;
			align-items: center;
		}

		text {
			font-size: px2vh(40);
			color: #666666;
			font-weight: bold;
		}

		.border {
			padding: px2vh(50) px2vw(40) px2vh(20);
		}

		.title {
			margin-bottom: px2vh(30);

			.project {
				flex: 1;
			}

			text:last-child {
				color: #98999B;
				margin-left: px2vw(10);
			}
		}

		.content-list {
			margin-bottom: px2vh(30);
			background: #FFFFFF;
			border-radius: px2vh(20);

			.distance {
				padding: px2vh(52) px2vw(50) px2vh(40);
			}

			.affirm {
				text {
					margin-right: auto;
					margin-left: px2vw(18);
				}
			}

			.content {
				width: px2vw(920);
				background: #F7F7F7;

				text {
					display: block;
					padding: px2vh(48);
					font-weight: normal;
					font-size: px2vh(38);
					line-height: px2vh(62);
				}
			}
		}
	}

	.img-icon {
		width: 13px;
		height: 13px;
	}

	.active {
		color: #417ADC !important;
	}
</style>
